<template>
	<view class="student-archives">
		<view class="list-cell flex-align" v-for="(item1, index1) in itemArr" :key="index1">
			<u-avatar :src="item1.avatar" size="90rpx"></u-avatar>
			<view class="right flex-grow-1">
				<view class="name">{{ item1.name }}</view>
				<view class="phone">{{ item1.phone }}</view>
			</view>
		</view>
	</view>
</template>

<script>
	const index = require('@/api/train/index.js')
	export default {

		data() {
			return {
				itemArr: [],
				enroll_id: ''
			}
		},
		onShow() {
			// this.selectStudent()
		},
		onLoad(options) {
			this.enroll_id = options.enroll_id
			this.getMoreEnrollMember()
		},
		methods: {

			async getMoreEnrollMember() {
				let params = {
					app_id: this.$https.weixinAppId,
					project_id: getApp().globalData.projectId,
					enroll_id: this.enroll_id
				}
				let res = await index.getMoreEnrollMember(params)
				if (res.code == 1) {
					this.itemArr = res.data.result

				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	.student-archives {
		padding: 0 34rpx;

		/deep/.u-index-list {
			scroll-view {
				height: calc(100vh - 220rpx - env(safe-area-inset-bottom));
				;
			}
		}

		.title {
			font-size: 32rpx;
			height: 100rpx;
			padding-top: 40rpx;

			&::before {
				content: '';
				display: inline-block;
				width: 6rpx;
				height: 28rpx;
				background-color: #0072ff;
				margin-top: 2rpx;
				margin-right: 22rpx;
			}
		}

		.list-cell {
			padding: 24rpx 0;
			position: relative;

			&::before {
				content: '';
				position: absolute;
				left: 110rpx;
				bottom: 0;
				right: 0;
				height: 1px;
				background-color: #f2f2f2;
			}

			.right {
				margin-left: 20rpx;
			}

			.rightlist {
				position: absolute;
				right: 40rpx;
				// margin-left: 40%;
			}

			.phone {
				font-size: 22rpx;
				font-weight: 400;
				margin-top: 10rpx;
				color: #BEBEBE;
			}
		}
	}
</style>
